home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / util / cli / mcomms_1_4.lha / Install / Install MCommands < prev    next >
Text File  |  1995-08-31  |  6KB  |  249 lines

  1. ; Installer script for MCommands
  2. ; $VER: Install MCommands 37.5 (31.8.95)
  3.  
  4. (complete 0)
  5.  
  6. (set @default-dest "C:")
  7. (set @script-dest "S:Shell-Startup")
  8.  
  9. (set #comm-dir "/C/")
  10. (set #script-name "/S/RX-Startup")
  11.  
  12. ; ***************************************************************************
  13. ; English strings
  14.  
  15. (if (= @language "english")
  16.     (
  17.         (set #bad-kick
  18.             (cat "You must have AmigaDOS 2.04 or higher to use MCommands!"))
  19.  
  20.         (set #welcome
  21.             (cat "\nMCommands installation\n\n\n"
  22.            "This script installs MCommands 1.4\n"
  23.            "on your Amiga.\n\n\n\n"
  24.            "MCommands package is\n"
  25.            "Copyright ⌐ 1994-95 Michael Letowski\n"
  26.            "All rights reserved.\n\n"))
  27.  
  28.         (set #where-commands
  29.             (cat "Where should MCommands be installed?"))
  30.  
  31.         (set #where-help
  32.             (cat "\nBy default, all CLI commands are placed in C:"
  33.            " logical directory. Hovewer, the commands can be"
  34.            " placed in any directory, as long as it is added to"
  35.            " search path by using \"Path\" command.\n\n"))
  36.  
  37.         (set #script
  38.             (cat "Shall RXControl aliases be added to " @script-dest "?"))
  39.  
  40.         (set #script-help
  41.             (cat "\nTo make RXControl fully compatible with"
  42.            " default setup, aliases may be added to"
  43.            " your Shell-Startup file that emulate"
  44.            " commands from SYS:Rexxc directory."))
  45.  
  46.         (set #which-commands
  47.             (cat "Which MCommands should be installed?"))
  48.  
  49.         (set #which-commands-help
  50.             (cat "\n\n\"BootLog\" records time and reason of reboot;"
  51.            "\n\n\"ChangeFont\" replaces topaz.font with user supplied one;"
  52.            "\n\n\"ClickStart\" enables/disables AmigaDOS features;"
  53.            "\n\n\"Examine\" checks type of file;"
  54.            "\n\n\"For\" executes a command for multiple arguments;"
  55.            "\n\n\"RXControl\" controls ARexx;"
  56.            "\n\n\"Time\" times command execution;"
  57.            "\n\n\"Touch\" changes date of file creation.\n\n\n"))
  58.     )
  59. )
  60.  
  61. ; ***************************************************************************
  62. ; Polish strings
  63.  
  64. (if (= @language "polski")
  65.     (
  66.         (set #bad-kick
  67.             (cat "Musisz posiadaΩ AmigaDOS w wersji 2.04 lub wy√szej aby u√yΩ pakietu!"))
  68.  
  69.         (set #welcome
  70.             (cat "\nInstalacja \"MCommands\"\n\n\n"
  71.            "Skrypt ten zainstaluje pakiet\n"
  72.            "\"MCommands\" w wersji 1.4\n"
  73.            "na twojej Amidze.\n\n\n\n"
  74.            "Pakiet \"MCommands\" jest\n"
  75.            "Copyright ⌐ 1994-95 Michaε ╬δtowski\n"
  76.           "All rights reserved.\n\n"))
  77.  
  78.         (set #where-commands
  79.             (cat "Gdzie powinny zostaΩ zainstalowane rozkazy z pakietu?"))
  80.  
  81.         (set #where-help
  82.             (cat "\nDomy⌠lnie, miejscem dla rozkaz≤w CLI jest"
  83.            " logiczny katalog C:. Mo√na jednak umie⌠ciΩ"
  84.            " rozkazy w dowolnym miejscu tak dεugo, jak"
  85.            " bδdzie ono w ⌠cie√ce wyszukiwania"
  86.            " (ustawianej rozkazem \"Path\").\n\n"))
  87.  
  88.         (set #script
  89.             (cat "Czy mam dodaΩ skr≤ty (\"aliasy\") do pliku " @script-dest "?"))
  90.  
  91.         (set #script-help
  92.             (cat "\nAby uczyniΩ RXControl bardziej"
  93.            " zgodnym z typowym systemem, pewne"
  94.            " skr≤ty emulujΓce rozkazy z katalogu"
  95.            " SYS:Rexxc mogΓ zostaΩ doεΓczone do"
  96.            " pliku Shell-Startup."))
  97.  
  98.         (set #which-commands
  99.             (cat "Kt≤re rozkazy z pakietu powinny zostaΩ zaistalowane?"))
  100.  
  101.         (set #which-commands-help
  102.             (cat "\n\n\"BootLog\" zapisuje czas i pow≤d restartu komputera" 
  103.            "\n\n\"ChangeFont\" zamienia \"topaz.font\" na czcionkδ wybranΓ"
  104.            " przez u√ytkownika;"
  105.            "\n\n\"ClickStart\" wεΓcza/wyεΓcza funkcje AmigaDOS;"
  106.            "\n\n\"Examine\" okre⌠la typy plik≤w;"
  107.            "\n\n\"For\" wykonuje podany rozkaz dla wielu argument≤w;"
  108.            "\n\n\"RXControl\" pozwala na kotrolδ ARexx'a;"
  109.            "\n\n\"Time\" mierzy czas wykonania rozkazu;"
  110.            "\n\n\"Touch\" uaktualnia datδ modyfikacji pliku.\n\n\n"))
  111.  
  112.     )
  113. )
  114.  
  115. ; ***************************************************************************
  116. ; Install MCommands
  117.  
  118. ; Check AmigaDOS version
  119. (set #version (/ (getversion) 65536))
  120. (if (< #version 37)
  121.     (
  122.         (abort #bad-kick)
  123.     )
  124. )
  125.  
  126. (message #welcome)
  127.  
  128. (welcome)
  129. (set old_level @user-level)
  130.  
  131. (user 2)
  132. (set #mcommands-dir
  133.     (askdir
  134.         (prompt #where-commands)
  135.         (help #where-help)
  136.         (default @default-dest))
  137. )
  138.  
  139. ; Choose commands
  140. (if (< #version 39)
  141.     (
  142.         (set commands
  143.             (askoptions
  144.                 (prompt #which-commands)
  145.                 (help #which-commands-help @askoptions-help)
  146.                 (choices
  147.                     "BootLog"
  148.                     "ChangeFont"
  149.                     "ClickStart"
  150.                     "For"
  151.                     "RXControl"
  152.                     "Time"
  153.                     "Touch")
  154.             )
  155.         )
  156.         (set install-rx (IN commands 3))
  157.     )
  158.     (
  159.         (set commands
  160.             (askoptions
  161.                 (prompt #which-commands)
  162.                 (help #which-commands-help @askoptions-help)
  163.                 (choices
  164.                     "BootLog"
  165.                     "ChangeFont"
  166.                     "ClickStart"
  167.                     "Examine"
  168.                     "For"
  169.                     "RXControl"
  170.                     "Time"
  171.                     "Touch")
  172.             )
  173.         )
  174.         (set install-rx (IN commands 4))
  175.     )
  176. )
  177.  
  178. ; Do copy
  179. (user old_level)
  180. (set n 0)
  181. (if (< #version 40)
  182.     (while
  183.         (set comm
  184.             (select n
  185.                 "BootLog"
  186.                 "ChangeFont"
  187.                 "ClickStart37"
  188.                 "For"
  189.                 "RXControl"
  190.                 "Time"
  191.                 "Touch"
  192.                 "")
  193.         )
  194.         (
  195.             (if (IN commands n)
  196.                 (copyfiles
  197.                     (source (cat #comm-dir comm))
  198.                     (dest #mcommands-dir)
  199.                 )
  200.             )
  201.             (set n (+ n 1))
  202.             (complete (* n 12))
  203.         )
  204.     )
  205. ; 3.0 Install
  206.     (while
  207.         (set comm
  208.             (select n
  209.                 "BootLog"
  210.                 "ChangeFont"
  211.                 "ClickStart"
  212.                 "Examine"
  213.                 "For"
  214.                 "RXControl"
  215.                 "Time"
  216.                 "Touch"
  217.                 "")
  218.         )
  219.         (
  220.             (if (IN commands n)
  221.                 (copyfiles
  222.                     (source (cat #comm-dir comm))
  223.                     (dest #mcommands-dir)
  224.                 )
  225.             )
  226.             (set n (+ n 1))
  227.             (complete (* n 11))
  228.         )
  229.     )
  230. )
  231.  
  232. ; Append RX-Startup if RXControl was chosen
  233. (if install-rx
  234.     (if (askbool
  235.                 (prompt #script)
  236.                 (help #script-help)
  237.             )
  238.         (textfile
  239.             (dest @script-dest)
  240.             (include @script-dest)
  241.             (include #script-name)
  242.         )
  243.     )
  244. )
  245.  
  246. (set @default-dest #mcommands-dir)
  247. (complete 100)
  248. (exit)
  249.